define(function (require) {
var zsApp= require('app'); 
zsApp.service('promptCache', ['$rootScope', '$state', '$timeout', '$window', function($rootScope, $state, $timeout, $window) {

		// prompt
		this.prompt = function (promptTxt) {
			$rootScope.prompt = true;
			$rootScope.promptStatement = promptTxt;
			$timeout(function () {
                $rootScope.prompt = false;
            }, 1500);
		}

	    // success prompt
	    this.successPrompt = function (promptTxt) {
	    	
	    	$rootScope.prompt = true;
	    	$rootScope.success = true;
	    	$rootScope.promptStatement = promptTxt;
	    	$timeout(function () {
                $rootScope.prompt = false;
                $rootScope.success = false;
            }, 1500);
	    };

	    // error prompt
	    this.errorPrompt = function(promptTxt) {

	    	$rootScope.prompt = true;
	    	$rootScope.fail = true;
	    	$rootScope.promptStatement = promptTxt;
	    	$timeout(function () {
                $rootScope.prompt = false;
                $rootScope.fail = false;
            }, 1500);
	    };
	    
	}]);
});
